package zb.blog.dao;

import org.apache.ibatis.annotations.Param;
import zb.blog.bean.ArticleBean;

import java.util.List;
import java.util.Map;

public interface ArticleDao {

    List<ArticleBean> getArticleByStatus(@Param("param") Map<String, Object> param);

    void addArticle(@Param("bean") ArticleBean articleBean);

    ArticleBean getArticleById(@Param("id") int id);

    List<Map<String, Object>> getArticleByIdNear(@Param("id") Integer id);

    void updateArticleStatus(@Param("id") Integer id, @Param("status") Integer status);

    int updateArticle(@Param("bean") ArticleBean articleBean);

    Map<String, String> getArticleZipUrlById(@Param("id") Integer id);

    int updateBannerUrl(@Param("artId") Integer artId, @Param("key") String key);

    int updateZipFileUrl(@Param("artId") Integer artId, @Param("key") String key);

    void recordArtCount(@Param("id") Integer id);

    List<ArticleBean> getArticleAll(@Param("param") Map<String, String> param);
}
